package com.example.wangzh.developkit.base;

import android.os.Bundle;
import android.view.LayoutInflater;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.example.wangzh.developkit.R;
import com.wzh.advancelog.log.WzhLog;

/**
 * Created by wangzh on 2017/10/19.
 */

public abstract class BaseActivityNew<Binding> extends AppCompatActivity {
    protected Binding mBinding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBinding = (Binding) DataBindingUtil.setContentView(this, getLayoutRes());
        initView();
        initEvent();
        initData();
    }

    protected abstract int getLayoutRes();

    protected void initEvent() {
    }

    protected void initView() {
    }

    protected void initData() {
    }

    @Override
    protected void onDestroy() {
        WzhLog.CheckCachedLogSize();
        super.onDestroy();
    }
}
